package auleiy.halo;

import auleiy.halo.items.CreativeTabs;
import com.mojang.logging.LogUtils;
import auleiy.halo.client.HaloRegistry;
import auleiy.halo.items.Items;
import net.minecraft.resources.ResourceLocation;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.BuildCreativeModeTabContentsEvent;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import org.slf4j.Logger;

// The value here should match an entry in the META-INF/mods.toml file
@Mod(ModMain.ModId)
public class ModMain {

    public static final String ModId = "ba_halos";
    private static final Logger Logger = LogUtils.getLogger();

    public ModMain() {
        IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();
        MinecraftForge.EVENT_BUS.register(this);
        Items.Initialize(modEventBus);
        CreativeTabs.Initialize(modEventBus);
        HaloRegistry.Initialize();

        modEventBus.addListener(HaloRegistry::ClientSetup);
    }

    public static ResourceLocation Location(String name) {
        return ResourceLocation.fromNamespaceAndPath(ModId, name);
    }
}
